package cn.hchaojie.javase.day08;

import org.junit.Test;

import cn.hchaojie.javase.day08.Student.Teacher;

public class TestInnerClass {
	// 创建内部类
	@Test
	public void test1() {
		Student s = new Student();
		// System.out.println(s.age);
		
		// Student.Teacher t = s.new Teacher();
		
		// 必须先有一个外部类的对象，才能创建内部类
		Teacher t = s.new Teacher();
	}
	
	@Test
	public void test2() {
		Student s = new Student();
		s.study();
	}
}
